package lab02.test11;

public class Rectangle implements Printx {
    double width;
    double height;

    double area() {

        return width*height;
    }

    double perimeter() {
        return 2*width+2*height;
    }

    @Override
    public void printMyWay() {
        System.out.println("矩形的边长："+width+"   "+height);
        System.out.println("矩形的面积："+area());
        System.out.println("矩形的周长："+perimeter());

    }
}
